package com.woniuxy.movice.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.movice.dto.AllComment;
import com.woniuxy.movice.entity.Cinema;

public interface CinemaMapper {

	@Select("select * from cinema")
	List<Cinema> showAllCinema();
	//根据分影院id查询影院详细信息
	@Select("select * from cinema where yid=#{yid}")
	Cinema showCinemaById(int yid);
	
	@Select("SELECT uimg,uname,agrade,adate,acomment FROM users,appraise WHERE users.uid=appraise.apid ORDER BY aid desc")
	List<AllComment> showComment();
	
	@Insert("insert into appraise(agrade,acomment,apid,adate) value(#{agrade},#{acomment},#{uid},#{adate})")
	int addCommentInf(float agrade, String acomment,int uid,String adate);


}
